﻿#region References
using eCollabro.BAL.Entities.Models;
using System;
using System.Data.Entity.Infrastructure;
using System.Threading;
using System.Threading.Tasks;
#endregion 

namespace eCollabro.DAL.Interface
{
    public interface IUnitOfWork : IUnitOfWorkForService
    {
        void Save();
        void Dispose(bool disposing);
        IExtendedRepository ExtendedRepository();
    }

    // To be used in services e.g. ICustomerService, does not expose Save()
    // or the ability to Commit unit of work
    public interface IUnitOfWorkForService: IDisposable
    {
        IRepository<TEntity> Repository<TEntity>() where TEntity : BaseEntity;
    }
}